package com.yitiao.data_algorithms.leetcode.editor.cn;

import com.yitiao.data_algorithms.leetcode.editor.cn.base.ListNode;
import com.yitiao.data_algorithms.leetcode.editor.cn.base.TreeNode;

class PalindromeNumber {
    // 2022-09-01 13:50:23
    public static void main(String[] args) {
        Solution solution = new PalindromeNumber().new Solution();
    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public boolean isPalindrome(int x) {
            if (x < 0) return false;
            int cur = 0;
            int num = x;
            while (num != 0) {
                cur = (num % 10 + cur * 10);
                num = num / 10;

            }
            return cur == x;
        }
    }
//leetcode submit region end(Prohibit modification and deletion)

}